.class public Lcom/zuiapps/suite/utils/security/XorCrypt;
.super Ljava/lang/Object;
.source "XorCrypt.java"


# static fields
.field public static final XOR_CONST:B = 0x12t


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 7
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static xorEn(Ljava/io/File;Ljava/io/File;)V
    .registers 8
    .param p0, "src"    # Ljava/io/File;
    .param p1, "dest"    # Ljava/io/File;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .prologue
    .line 19
    new-instance v1, Ljava/io/FileInputStream;

    invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    .line 20
    .local v1, "fis":Ljava/io/FileInputStream;
    new-instance v2, Ljava/io/FileOutputStream;

    invoke-direct {v2, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    .line 21
    .local v2, "fos":Ljava/io/FileOutputStream;
    const/16 v5, 0x400

    new-array v0, v5, [B

    .line 22
    .local v0, "bs":[B
    const/4 v4, 0x0

    .line 23
    .local v4, "len":I
    :goto_f
    invoke-virtual {v1, v0}, Ljava/io/FileInputStream;->read([B)I

    move-result v4

    const/4 v5, -0x1

    if-eq v4, v5, :cond_28

    .line 24
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_17
    if-ge v3, v4, :cond_23

    .line 25
    aget-byte v5, v0, v3

    xor-int/lit8 v5, v5, 0x12

    int-to-byte v5, v5

    aput-byte v5, v0, v3

    .line 24
    add-int/lit8 v3, v3, 0x1

    goto :goto_17

    .line 27
    :cond_23
    const/4 v5, 0x0

    invoke-virtual {v2, v0, v5, v4}, Ljava/io/FileOutputStream;->write([BII)V

    goto :goto_f

    .line 29
    .end local v3    # "i":I
    :cond_28
    invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V

    .line 30
    invoke-virtual {v1}, Ljava/io/FileInputStream;->close()V

    .line 31
    return-void
.end method
